package javase.chixing.thread_synchronized;

//可以将这个实体类看作ATM机
class BankThread implements Runnable{
    BankObject bankObject;

    public BankThread(BankObject bankObject) {
        this.bankObject = bankObject;
    }

    public BankThread() {
    }

    @Override
    public void run() {
        bankObject.deposit(10);
    }
}
